package cn.com.cifi.mars.service.impl;

import cn.com.cifi.mars.bean.vo.sys.rsp.SysRouteVo;
import cn.com.cifi.mars.entity.common.SysRoute;
import cn.com.cifi.mars.mapper.mars.SysRouteMapper;
import cn.com.cifi.mars.service.SysRouteService;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yyd
 * @since 2019-09-18
 */
@Service
public class SysRouteServiceImpl extends ServiceImpl<SysRouteMapper, SysRoute> implements SysRouteService {

	@Autowired
	private SysRouteMapper sysRouteMapper;

	/**
	 * 查询路由
	 */
	@Override
	public List<SysRouteVo> queryRouteList() {
		List<SysRouteVo> voList=new ArrayList<>();
		LambdaQueryWrapper<SysRoute>lmd=new LambdaQueryWrapper<>();
		List<SysRoute>list=sysRouteMapper.selectList(lmd);
		list.forEach(x->{
			SysRouteVo vo=new SysRouteVo();
			BeanUtils.copyProperties(x, vo);
			voList.add(vo);
		});
		return voList;
	}
	
	
	
	
}
